package tk.mybatis.springboot.model;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import tk.mybatis.springboot.share.util.PropertiesUtil;

public class CarInfoReqMsg implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5422929961089816841L;

	private final String operType = "BDB";
	
	private String sendTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
	
	private String msg = "";
	
	private String sign = "";
	
	private Map<String, String> data = new HashMap<String, String>();
	
	private CarInfo carInfo = null;
	
	private CarInfoReqMsg(){
		
	}
	
	
	private String generateSign(){
		return "";
	}
	
	
	public static CarInfoReqMsg buildMessage(CarInfo carInfo){
		CarInfoReqMsg msg = new CarInfoReqMsg();
		msg.data.put("applicationID", PropertiesUtil.getMessage("application_id"));
		msg.data.put("licenseNo", carInfo.getLicenseNo());
		msg.sign = msg.generateSign();
		
		return msg;
	}
	
	public String getOperType() {
		return operType;
	}


	public String getSendTime() {
		return sendTime;
	}


	public String getMsg() {
		return msg;
	}


	public String getSign() {
		return sign;
	}


	public Map<String, String> getData() {
		return data;
	}


	public CarInfo getCarInfo() {
		return carInfo;
	}	
}
